
#ifndef EVCPE_TRANSFER_H_
#define EVCPE_TRANSFER_H_

#include "method.h"
#include "session.h"
#include "cpe.h"
#include "download.h"
#include "upload.h"
#include "transfer_complete.h"

struct evcpe_transfer_arg {
	struct evcpe *my_cpe;
	struct evcpe_session *my_session;
	void *upload_or_download;
	struct evcpe_transfer_complete *transfer_complete;
	struct evbuffer *buffer;
	int transfer_retry_cnt;	//upload or download retry times
	enum evcpe_method_type up_or_down;
};

int evcpe_transfer_get_data(struct evbuffer *output_buffer, 
		struct evcpe_download *download);

int evcpe_transfer_add_data(struct evbuffer *output_buffer, 
		struct evcpe_upload *upload);

#endif

